#include "createcollect.h"
#include "ui_createcollect.h"
#include<QFileDialog>
createcollect::createcollect(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::createcollect)
{
    ui->setupUi(this);
}

createcollect::~createcollect()
{
    delete ui;
}

void createcollect::on_picture_clicked()
{
    image=QFileDialog::getOpenFileName(this,"",QDir::currentPath());
    ui->picture->setIcon(QPixmap(image));
    ui->picture->setIconSize(QSize(ui->picture->width(),ui->picture->height()));
}


void createcollect::on_submit_clicked()
{
    QString str=ui->collectname->text();
    ui->collectname->clear();
    if(!str.isEmpty())
    {
        emit ablecreateonecollect(image,str);

    }
    close();
}

